-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added CreditUsed Report and CreditTicket Report #40
base: main
Are you sure you want to change the base?
Conversation
Hello, Thanks for everithing already done. does this report focntion still working? because i tried to add it without success, tried to check code but i'm not really good as php ;( regards |
Can you rebase you branch develop to be compatible with glpi 9.4 Best regards |
e565188
to
cd0a5da
Compare
Hello. |
Will be great to add the possibility to search tickets with credits criteria. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
I haven't pointed out all the cases, but you must be careful to use English in the names of variables/functions and comments.
Please correct.
$LANG['creditused'][5]="Number ticket"; | ||
$LANG['creditused'][6]="Entity"; | ||
$LANG['creditused'][7]="Active"; | ||
$LANG['creditused_nulo'][0]="None"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it's a typo?
$LANG['creditused_nulo'][0]="None"; | |
$LANG['creditused_null'][0]="None"; |
include ("../../../../inc/includes.php"); | ||
|
||
$report= new PluginReportsAutoReport($LANG['plugin_credit']['creditused']); | ||
//Filtro fecha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English comments, please
$report->setColumns([new PluginReportsColumn('id', $LANG['creditused'][5]), | ||
new PluginReportsColumn('ticket', $LANG['creditused'][0]), | ||
new PluginReportsColumn('active', $LANG['creditused'][7]), | ||
new PluginReportsColumn('categoria', $LANG['creditused'][1]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new PluginReportsColumn('categoria', $LANG['creditused'][1]), | |
new PluginReportsColumn('category', $LANG['creditused'][1]), |
//Filtro fecha | ||
new PluginReportsDateIntervalCriteria($report, 'date', $LANG['creditused_criteria'][0]); | ||
//Filtro activo | ||
$choices = [0=>'--', 2 =>$LANG['creditused_active'][1], 1 => $LANG['creditused_active'][0]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$choices = [0=>'--', 2 =>$LANG['creditused_active'][1], 1 => $LANG['creditused_active'][0]]; | |
$choices = [ | |
0 => '--', | |
2 => $LANG['creditused_active'][1], | |
1 => $LANG['creditused_active'][0], | |
]; |
inner join glpi_plugin_credit_entities as gpce on gpce.id=gpct.plugin_credit_entities_id | ||
inner JOIN `glpi_entities` as ge ON (`gpce`.`entities_id` = `ge`.`id`) | ||
".getEntitiesRestrictRequest(" WHERE", "gpce"); | ||
if ($filter_active->getParameterValue()==2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($filter_active->getParameterValue()==2) { | |
if ($filter_active->getParameterValue() == 2) { |
|
||
$report= new PluginReportsAutoReport($LANG['plugin_credit']['creditvoucher']); | ||
//Filtro Activo | ||
$choices = [0=>'--', 2 =>$LANG['creditvoucher_active'][1], 1 => $LANG['creditvoucher_active'][0]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$choices = [0=>'--', 2 =>$LANG['creditvoucher_active'][1], 1 => $LANG['creditvoucher_active'][0]]; | |
$choices = [ | |
0 => '--', | |
2 => $LANG['creditvoucher_active'][1], | |
1 => $LANG['creditvoucher_active'][0], | |
]; |
left join glpi_plugin_credit_tickets as pct on (`pct`.`plugin_credit_entities_id` = `gpce`.`id`) | ||
inner JOIN `glpi_entities` as ge ON (`gpce`.`entities_id` = `ge`.`id`)". | ||
getEntitiesRestrictRequest(" WHERE", "gpce"); | ||
if ($filter_active->getParameterValue()==2) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ($filter_active->getParameterValue()==2) { | |
if ($filter_active->getParameterValue() == 2) { |
CreditUsed Report: lists each credit spent.
CreditTicket Report: lists each credit voucher information.
old pull request #23
#34